﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MvcMall.Core.Contacts.Tasks;

namespace MvcMall.AdminWeb.Manage.StoreApplies
{
    public partial class Address : ManageBasePage
    {

        private IStoreTask _storeTask;
        protected void Page_Load(object sender, EventArgs e)
        {
            ValidatePagePower("StoreList");
            _storeTask = GetInstance<IStoreTask>();
            if (!IsPostBack)
            {
                int id = -1;
                int.TryParse(Request["ID"], out id);
                if (id > 0)
                {
                    var model = _storeTask.Get(id);
                    if (model == null)
                    {
                        ShowMsgAndReturn("末读取到该数据");
                        return;
                    }
                    rptAddressList.DataSource = model.StoreShippings;
                    rptAddressList.DataBind();
                }
            }
        }
    }
}